﻿@model GameSchool.Models.HandIn

<script src="@Url.Content("~/Scripts/jquery-1.5.1.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="/Content/css/forms.css" />
@using (Html.BeginForm()) {
   
    <fieldset>

        <legend>Nýtt verkefni</legend>

     <section class="one-half">
            <div class="editor-label">
            <h2>Titill:</h2>
            </div>

            <div class="editor-field">
            @Html.EditorFor(model => model.Title)
            @Html.ValidationMessageFor(model => model.Title)
            </div>

       <div class="editor-label">
            <h2>Skráarslóð:</h2>
        </div>
        <div class="editor-field">
            <input type="file" name="fileUpload" id="handInUpload" />
        </div>
        
            @Html.HiddenFor(model => model.ID)
            @Html.HiddenFor(Model => Model.LevelID)
        <div class="editor-label">

        </section>
        <section class="one-half last">
         <div class="editor-label">
            <h2>Lýsing:</h2>)
        </div>
        <div class="editor-field">
            @Html.TextAreaFor(model => model.Descr, new { style = "Width: 100%; resize: none;" })
            @Html.ValidationMessageFor(model => model.Descr)
        </div>
               

        <div class="editor-label">
            <h2>Stig:</h2>
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.MaxPoints)
            @Html.ValidationMessageFor(model => model.MaxPoints)
        </div>

        <div class="editor-label">
            <h2>Bónusstig:</h2>
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.MaxBonusPoints)
            @Html.ValidationMessageFor(model => model.MaxBonusPoints)
        </div>
           

      <div class="editor-label">
            @Html.HiddenFor(model => model.CourseID)
        </div>

        <section class="buttonfield"> 
        <section class="one-third last">
                <input type="submit" value="Vista" class="sendbutton" name="sendbutton" /> 
             </section>  
             
        <section class="one-third">       
                 <a href="@Url.Action("Index", "Home")"><button class="backbutton">Hætta við</button></a>
             </section>
        </section>
             <div class="validation-message">
                <p>
                   @Html.ValidationSummary(true, "Account creation was unsuccessful. Please correct the errors and try again.")
                </p>
            </div>        
         </section>    
    
             
    </fieldset>
}
